package service

import (
	"html/template"
	"net/http"
)

func Post(w http.ResponseWriter, req *http.Request) {
	req.ParseForm()
	usr := req.Form["Name"][0]
	mail := req.Form["Email"][0]
	phone := req.Form["Phone"][0]
	subject := req.Form["Subject"][0]
	message := req.Form["Message"][0]

	page := template.Must(template.ParseFiles("templates/info.html"))

	page.Execute(w, map[string]string{
		"usr":     usr,
		"mail":    mail,
		"phone":   phone,
		"subject": subject,
		"message": message,
	})
}
